<?php
  require_once "./jssdk/jssdk.php";
  $jssdk = new JSSDK("wxe1a45bd9dbb96f13", "b7dd0891042008755c4a580355554be7");
  $signPackage = $jssdk->GetSignPackage();
?>
<!DOCTYPE html>
<html>
	<head>
		<title>测测你是不是一个心急的人？</title>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0" />
		<meta name="format-detection" content="telephone=no" />
		<link rel="stylesheet" type="text/css" href="./css/base.css"/>
		<link rel="stylesheet" href="./css/animate.css">
		<link rel="stylesheet" type="text/css" href="./css/index.css?v=201601010"/>
		<script>
			!function(){window.design=640,window.resp=function(){var a=document.documentElement.clientWidth,b=100*(640/design);a>design&&(a=design),document.documentElement.style.fontSize=(b>100*(a/design)?100*(a/design):b)+"px"},resp();/*window.onresize=function(){resp()}*/}();
		</script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script>
			//微信分享
			wx.config({
				appId: '<?php echo $signPackage["appId"];?>',
				timestamp: <?php echo $signPackage["timestamp"];?>,
				nonceStr: '<?php echo $signPackage["nonceStr"];?>',
				signature: '<?php echo $signPackage["signature"];?>',
				jsApiList: [
					'checkJsApi',
					'onMenuShareTimeline',
					'onMenuShareAppMessage'
				]
			});
			wx.ready(function () {
				// 在这里调用 API
				var shareData = {
					title: '测测你是不是一个心急的人？',
					desc: '心急吃不了热豆腐，赚钱也要稳稳地',
					link: 'http://h5.unext.com.cn/tofu/',
					imgUrl: 'http://h5.unext.com.cn/tofu/images/wxshare.jpg'
				};
				wx.onMenuShareAppMessage(shareData);
				wx.onMenuShareTimeline(shareData);
			});

		</script>
		<style>
			@media only screen and (max-height: 610px) {
				.page-1,
				.game .popup .content{
					transform: scale(0.95) translateY(-0.28rem);
				}
			}
			@media only screen and (max-height: 590px) {
				.page-1,
				.game .popup .content{
					transform: scale(0.9) translateY(-0.55rem);
				}
			}
		</style>
	</head>
<body ontouchstart>

	<div class="loading">
		<div class="sun"></div>
		<div class="cloud cloud-1"></div>
		<div class="cloud cloud-2"></div>
		<div class="cloud cloud-3"></div>
		<div class="cloud cloud-4"></div>
		<div class="cloud cloud-5"></div>
		<div class="img-top"></div>
		<div class="img">
			<div class="progress" id="loading-progress">00%</div>
		</div>
		<div class="item item-1"></div>
		<div class="item item-2"></div>
	</div>
	<audio preload="auto" loop="true"  style="width:0;height:0" id="audio-music">
		<source src="audio/music.mp3" type="audio/mpeg" />
	</audio>
	<div class="wrapper">
		<div class="page page-1">
			<div class="logo"></div>
			<!---->
			<div class="slogan-3">
				<div class="word shake-little"></div>
			</div>
			<!--锅-->
			<div class="pan">
				<div class="smog" id="smog"></div>
				<div class="tofu-pan shake-little"></div>
				<div class="fire" id="fire"></div>
			</div>

			<!--第二页标题-->
			<div class="slogan-1">
				<div class="word shake-little"></div>
			</div>
			<!--第二页内容-->
			<div class="box-2">
				<!--人物-->
				<div class="person-1 swing-x"></div>
				<div class="person-2 swing-x"></div>
				<div class="person-3 swing-z"></div>
				<!--在哭的豆腐-->
				<div class="tofu-ku" id="tofu-ku"></div>
				<!--开始游戏-->
				<div class="game-begin">
					<div class="hand hand-ani"></div>
					<div class="flash hand-flash"></div>
					<div class="btn-game" id="btn-game-begin" onclick="_czc.push(['_trackEvent', '游戏', '进入', '进入游戏界面','10','jinru']);"></div>
				</div>
			</div>
		</div>
		<!--游戏-->
		<div class="page game show">
			<div class="music" id="music"></div>
			<div class="logo"></div>
			<div class="slogan-2">
				<div class="word"></div>
				<div class="timer-box" >
					<div class="pointer"></div>
					<div data-timestamp='60000' class="timer" id="timer"> <span class="second">00</span> : <span class="msec">00</span> </div>
				</div>
			</div>
			<div class="game-box">
				<div class="dish" id="dish">
					<div class="tofu" id="tofu"></div>
				</div>
			</div>
			<!--提示-->
			<div class="popup tpis show" id="game-tips">
				<div class="content">
					<div class="close" id="close"></div>
					<div class="img"></div>
				</div>
			</div>
			<div class="popup rule show" id="game-rule">
				<div class="content">
					<h1>游戏规则</h1>
					<div class="text-1">
						<p>根据热豆腐<b>滑动方向</b>，<b>反向</b>转动手机</p>
						<p><b>阻止</b>热豆腐<b>滑出</b>盘子，滑出则<b>失败</b></p>
						<p>坚持<span>1分钟不滑出</span>即可<span>成功领取奖金</span></p>
					</div>
					<h3>奖品说明：</h3>
					<div class="text-2">
						<p><span>1.</span>成功完成游戏即可领取<span>88</span>元用友友金所投资<span>红包</span></p>
						<p><span>2.</span>每位参与者只能领取<span>一次</span>红包</p>
						<p><span>3.</span>活动时间：2016年10月12日-16日</p>
						<p class="terms">*在法律允许的范围内，用友友金所保留本次活动的最终解释权</p>
					</div>
					<div class="game-start">
						<div class="hand hand-ani"></div>
						<div class="flash hand-flash"></div>
						<div class="btn-game" id="btn-game-start" onclick="_czc.push(['_trackEvent', '游戏', '开始', '开始游戏','10','kaishi']);"></div>
					</div>
				</div>
			</div>
			<!--失败-->
			<div class="popup loser" id="game-loser" >
				<div class="content">
					<div class="box">
						<div class="word">
							<p>你只坚持了<span id="score">00</span>秒</p>
							<p>嘴巴被烫成八成熟</p>
						</div>
					</div>

					<div class="btn-box">
						<div class="btn btn-again game-restart" onclick="_czc.push(['_trackEvent', '游戏', '重玩', '重玩游戏','10','chongwan']);"></div>
						<div class="btn btn-share" onclick="shareTips();_czc.push(['_trackEvent', '分享', '分享', '分享提示','10','fenxiang']);"></div>
					</div>
				</div>
			</div>
			<!--通过-->
			<div class="popup pass" id="game-pass" >
				<div class="content">
					<div class="box"></div>
					<a class="btn btn-get" href="https://www.yyfax.com/wechat/wechatCoupon.html?activityKey=7cnhnt9150376xwpckh7f9qu9u70oh&activityId=2" _czc.push(['_trackEvent', '链接', '跳转', '链接跳转','10','lianjie']);></a>
					<div class="btn-box">
						<div class="btn btn-again game-restart" onclick="_czc.push(['_trackEvent', '游戏', '重玩', '重玩游戏','10','chongwan']);"></div>
						<div class="btn btn-share" onclick="shareTips();_czc.push(['_trackEvent', '分享', '分享', '分享提示','10','fenxiang']);"></div>
					</div>
				</div>
			</div>
			<!--分享-->
			<div class="popup share">
				<div class="popup-share"></div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src='./js/jquery.min.js'></script>
	<script type="text/javascript" src='./js/preloadjs.min.js'></script>
	<script type="text/javascript" src='./js/jquery.transit.js'></script>
	<script type="text/javascript" src='./js/animation.js'></script>
	<script type="text/javascript" src='./js/index.js?v=2016101013'></script>
	<div style="display: none">
		<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1260576671'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1260576671' type='text/javascript'%3E%3C/script%3E"));</script>
	</div>
	</body>
</html>
